package com.ruoyi.system.service;

import com.ruoyi.common.mybatis.core.page.PageQuery;
import com.ruoyi.common.mybatis.core.page.TableDataInfo;
import com.ruoyi.system.domain.Investigation;
import com.ruoyi.system.domain.bo.InvestigationBo;
import com.ruoyi.system.domain.vo.InvestigationStatisticVo;
import com.ruoyi.system.domain.vo.InvestigationVo;

import java.util.Collection;
import java.util.List;

/**
 * 问卷Service接口
 *
 * @author ruoyi
 * @date 2024-12-13
 */
public interface IInvestigationService {

    /**
     * 查询问卷
     */
    InvestigationVo queryById(Long id);

    InvestigationVo queryById(Long id, boolean onlyMain);

    /**
     * 查询问卷列表
     */
    TableDataInfo<InvestigationVo> queryPageList(InvestigationBo bo, PageQuery pageQuery);

    /**
     * 查询问卷列表
     */
    List<InvestigationVo> queryList(InvestigationBo bo);

    /**
     * 修改问卷
     */
    Boolean insertByBo(InvestigationBo bo);

    /**
     * 修改问卷
     */
    Boolean updateByBo(InvestigationBo bo);

    /**
     * 校验并批量删除问卷信息
     */
    Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);

    void incAnswerCount(Long investigationId);

    boolean updateStatus(Long investigationId, Integer status);

    InvestigationStatisticVo statistic(Long id);

    List getAnswerExport(InvestigationVo investigation);
}
